home *** CD-ROM | disk | FTP | other *** search
/ Aminet 40 / Aminet 40 (2000)(Schatztruhe)[!][Dec 2000].iso / Aminet / util / boot / BlizKick.lha / BlizKick / Modules / BPPCFix11.ASM < prev    next >
Assembly Source File  |  2000-09-04  |  2KB  |  92 lines

  1. ; FILE: Source:modules/BPPCFix11.ASM          REV: 1 --- Disable ppc.library of blizzppc
  2.  
  3. ;
  4. ; BPPCFix module for BlizKick
  5. ; ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  6. ; Written by Harry Sintonen.
  7. ;
  8. ; 1.0: initial release.
  9. ; 1.1: fixed priority to -1. with priority 0 and installed to ROM
  10. ;      area, this module was initialized before `Blizzard PPC Library Init'
  11. ;      and thus failed to work.
  12. ;
  13. ; based on:
  14. ;
  15. ;** BPPCFix_kickcode.asm
  16. ;**
  17. ;** Disables ppc.library resident modules on Amigas with BPPC
  18. ;** Written in 1998 by Frank Wille <frank@phoenix.owl.de>
  19. ;**
  20. ;** V1.0  26-Dec-98
  21. ;**       created
  22. ;
  23. ;
  24. ;
  25.  
  26.     incdir    "include:"
  27.     include    "exec/types.i"
  28.     include    "exec/libraries.i"
  29.  
  30.     include    "exec/execbase.i"
  31.  
  32.     include    "blizkickmodule.i"    ; Some required...
  33.  
  34.     SECTION    MODULE,CODE
  35. _DUMMY_LABEL
  36.  BK_MOD BKMF_SingleMode,_end,(RTF_COLDSTART)<<24+37<<16+NT_UNKNOWN<<8+(256-1),_name,_idstr,_init
  37.  
  38. ; Singlemode on,
  39. ; COLDSTART module, requires KS V37.x or better, module type NT_UNKNOWN, priority -1.
  40.  
  41. _init    movem.l    d0-a6,-(sp)
  42.     move.l    (4).w,a6
  43.  
  44.     jsr    (-$84,a6)        ; Forbid()
  45.  
  46.     move.l    (ResModules,a6),a0
  47.     move.l    a0,a1
  48.     bra.b    loop_end
  49. loop:
  50.     move.l    d0,(a1)+
  51.     bpl.b    1$
  52.     bclr    #31,d0
  53.     move.l    d0,a0
  54.     move.l    d0,a1
  55.     bra.b    loop_end
  56. 1$:    move.l    d0,a2
  57.  
  58. ; compare module name with "ppc.library"
  59.     move.l    (RT_NAME,a2),a2        ; name of current module
  60.     lea    (ppc_name,pc),a3
  61.     moveq    #12-1,d0
  62. 2$:    cmpm.b    (a2)+,(a3)+
  63.     dbne    d0,2$
  64.     bne.b    loop_end
  65.     subq.l    #4,a1            ; ppc.library found - remove module
  66.  
  67. loop_end:
  68.     move.l    (a0)+,d0
  69.     bne.b    loop
  70.  
  71.     clr.l    (a1)            ; end list
  72.  
  73.     jsr    (-$27c,a6)        ; CacheClearU()
  74.  
  75.     jsr    (-$8a,a6)        ; Permit()
  76.  
  77. exit    movem.l    (sp)+,d0-a6
  78.     rts
  79.  
  80. ppc_name
  81.     dc.b    'ppc.library',0
  82.  
  83. _name    dc.b    'BPPCFix',0
  84. _idstr    dc.b    'BPPCFix 1.1 (7.3.00)',0
  85.     CNOP    0,2
  86. _end
  87.  
  88.     SECTION    VERSION,DATA
  89.  
  90.     dc.b    '$VER: BPPCFix_MODULE 1.1 (7.3.00)',0
  91.  
  92.